package com.xiaoxing.zhinenghuacangku_liaocheng.di.module;

import com.jess.arms.di.scope.ActivityScope;
import com.xiaoxing.zhinenghuacangku_liaocheng.mvp.contract.LiaoCheng_YiKuContract;
import com.xiaoxing.zhinenghuacangku_liaocheng.mvp.model.LiaoCheng_YiKuModel;

import dagger.Module;
import dagger.Provides;


@Module
public class LiaoCheng_YiKuModule {
    private LiaoCheng_YiKuContract.View view;

    /**
     * 构建YiKuModule时,将View的实现类传进来,这样就可以提供View的实现类给presenter
     *
     * @param view
     */
    public LiaoCheng_YiKuModule(LiaoCheng_YiKuContract.View view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    LiaoCheng_YiKuContract.View provideYiKuView() {
        return this.view;
    }

    @ActivityScope
    @Provides
    LiaoCheng_YiKuContract.Model provideYiKuModel(LiaoCheng_YiKuModel model) {
        return model;
    }
}